@echo off
setlocal

set APP=FileServer

:: Linux amd64
set GOOS=linux
set GOARCH=amd64
go build -o %APP%-linux-amd64 main.go

:: Linux arm64
set GOOS=linux
set GOARCH=arm64
go build -o %APP%-linux-arm64 main.go

:: Windows amd64
set GOOS=windows
set GOARCH=amd64
go build -o %APP%-windows-amd64.exe main.go

:: Windows arm64
set GOOS=windows
set GOARCH=arm64
go build -o %APP%-windows-arm64.exe main.go

:: macOS arm64
set GOOS=darwin
set GOARCH=arm64
go build -o %APP%-darwin-arm64 main.go

echo 所有平台构建完成！
endlocal
pause
